package com.zenchn.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * 区域新增映射
 *
 * @author dingxinfa
 * @date 2020-04-20
 **/
@ApiModel(value="区域新增映射",description="区域新增映射对象")
public class AreaAddDO {


    @NotEmpty(message = "区域名称不能为空")
    @ApiModelProperty(value="区域名称")
    private String name;

    @NotEmpty(message = "编辑码不能为空")
    @Size(max=3,min=2,message = "编辑码长度必须为2位或者3位")
    @ApiModelProperty(value="编辑码，区域编码可编辑部分")
    private String editCode;

    @ApiModelProperty(value="上级区域全码")
    private String parentCode;

    @ApiModelProperty(value="上级区域简码")
    private String parentShortCode;

    @ApiModelProperty(value="城乡分类编码")
    private String category;

    @ApiModelProperty(value="是否启用")
    private Boolean isEnable;

    @ApiModelProperty(value="备注")
    private String memo;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEditCode() {
        return editCode;
    }

    public void setEditCode(String editCode) {
        this.editCode = editCode;
    }

    public String getParentCode() {
        return parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    public String getParentShortCode() {
        return parentShortCode;
    }

    public void setParentShortCode(String parentShortCode) {
        this.parentShortCode = parentShortCode;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public Boolean getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(Boolean isEnable) {
        this.isEnable = isEnable!=null?isEnable:true;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    @Override
    public String toString() {
        return "AreaAddDO{" +
                " name='" + name + '\'' +
                ", editCode='" + editCode + '\'' +
                ", parentCode='" + parentCode + '\'' +
                ", parentShortCode='" + parentShortCode + '\'' +
                ", category='" + category + '\'' +
                ", isEnable=" + isEnable +
                ", memo='" + memo + '\'' +
                '}';
    }
}
